package com.kaizeli.website.service;

import com.kaizeli.website.pojo.dto.AttendanceDTO;
import com.kaizeli.website.pojo.entity.AttendanceDO;
import com.kaizeli.website.pojo.vo.AttendanceVO;

import java.time.LocalDate;
import java.util.List;

/**
 * 考勤服务接口
 */
public interface AttendanceService {
    
    /**
     * 新增考勤记录
     */
    Long save(AttendanceDO attendanceDO);
    
    /**
     * 更新考勤记录
     */
    Boolean update(AttendanceDO attendanceDO);
    
    /**
     * 根据ID查询考勤记录
     */
    AttendanceVO getById(Long id);
    
    /**
     * 根据ID删除考勤记录
     */
    Boolean deleteById(Long id);
    
    /**
     * 根据员工ID查询考勤记录
     */
    List<AttendanceVO> listByEmployee(Long employeeId);
    
    /**
     * 根据项目ID查询考勤记录
     */
    List<AttendanceVO> listByProject(Long projectId);
    
    /**
     * 根据员工ID和日期范围查询考勤
     */
    List<AttendanceVO> listByEmployeeAndDateRange(Long employeeId, LocalDate startDate, LocalDate endDate);
    
    /**
     * 根据项目ID和日期范围查询考勤
     */
    List<AttendanceVO> listByProjectAndDateRange(Long projectId, LocalDate startDate, LocalDate endDate);
    
    /**
     * 统计员工工作时长
     */
    Double sumWorkHoursByEmployee(Long employeeId, LocalDate startDate, LocalDate endDate);
}

